{aide_template 'common/header'}
<form action="" method="post" class="form-horizontal form" >
	{if $cover == 'app'}
	<div class="panel">
		<div class="panel-body">
		    <div class="form-group">
		        <label class="col-sm-2 control-label">直接链接</label>
		        <div class="col-sm-9 col-xs-12">
		            <p class='form-control-static'><a href='javascript:;' class="js-copy" title='点击复制链接' data-url="{php echo app_url('goods/list/merchant',array('id'=>MERCHANTID))}" >{php echo app_url('goods/list/merchant',array('id'=>MERCHANTID))}</a></p>
		        </div>
		    </div>
		    <div class="form-group js-qrcode-show">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">二维码</label>
				<div class="col-sm-9 col-xs-12 ">
					<div class="qrcode-block" style="margin-top:5px"><img src="{php echo web_url('application/merchant/cover',array('url' => app_url('goods/list/merchant',array('id'=>MERCHANTID))))}" width="150" height="150"></canvas></div>
				</div>
			</div>
		</div>
	</div>
	{else}
	<div class="bs-callout bs-callout-danger" id="callout-glyphicons-empty-only">
        <h4>主办方登陆方式：</h4>
        <div class="bs-example bs-example-images" data-example-id="image-shapes" style="position:relative;">
            <a href="{php echo $_W['siteroot'] . 'addons/aide_activity/web/merch.php';}" target="_blank"><span class="btn btn-success">{php echo $_W['siteroot'] . 'addons/aide_activity/web/merch.php';}</span></a>
        	<a href="javascript:;"   data-url="{php echo $_W['siteroot'] . 'addons/aide_activity/web/merch.php';}" id="js-copy" class="color-default js-clip">点击复制</a>
        </div>
    </div>
    {/if}
</form>
<script type="text/javascript">
	require(['jquery', 'util'], function($, util){
		$('.js-copy').click(function(){
			util.clip(".js-copy", $(this).attr('data-url'));
		});
	});
	$('.js-clip').each(function(){
		util.clip(this, $(this).data('url'));
	});
</script>
{aide_template 'common/footer'}
